package com.hm.fast.util;

/**
 * @author shishun.wang
 * @version 1.0
 * @date 2019/2/11 14:57
 * @describe
 */
public class BeanUtils<T> {
	
	public static <T> T copyProperties(Object source,T target, String... ignoreProperties){
		if (source == null){
			return null;
		}
		org.springframework.beans.BeanUtils.copyProperties(source,target,ignoreProperties);
		return target;
	}
	
	public static <T> T copyProperties(Object source,Class<T> objClass, String... ignoreProperties){
		if (source == null){
			return null;
		}
		T entity = org.springframework.beans.BeanUtils.instantiateClass(objClass);
		return copyProperties(source,entity,ignoreProperties);
	}
}
